import React from 'react';
import PropTypes from 'prop-types';

const Link = ({
	onClick,
	active,
	children
}) => (
	<button 
		className={['btn-primary',active?'btn-active':''].join(' ')} 
		style={{marginLeft:4}}
		onClick={(e)=>onClick(e,active)}
	>
		{children}
	</button>
)
Link.propTypes = {
	onClick: PropTypes.func.isRequired,
	active: PropTypes.bool.isRequired,
	children: PropTypes.any.isRequired
}
export default Link